package com.example.administrator.jingpingou.shop_activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;

import com.example.administrator.jingpingou.R;
import com.example.administrator.jingpingou.application.MyApplication;

public class TitleWebActivity extends AppCompatActivity {
    private WebView mWebView;
    private String link;
    private ImageView mImageViewBack;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_title_web);
        initView();
        Intent intent = getIntent();
        link = intent.getStringExtra("link");
        setData();
        setListener();
    }

    private void setListener() {
        mImageViewBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    private void setData() {
        mWebView.loadUrl(link);
    }

    private void initView() {
        mWebView = (WebView) findViewById(R.id.wv_title_web);
        mImageViewBack = (ImageView) findViewById(R.id.iv_title_web_back);
    }
}
